import axios from '../interceptors.js'
// 搜索查看数据列表
export const getDirFilesInfo = (data) => {
  return axios({
    url: `/datavolum/getDirFilesInfo`,
    method: 'get',
    params: data
  })
}
// 新增文件夹
export const createFolder = (data) => {
  return axios({
    url: '/datavolum/createFolder',
    method: 'post',
    data
  })
};

// 删除数据
export const deleteObject = (data) => {
  return axios({
    url: '/datavolum/deleteObject',
    method: 'delete',
    data
  })
};
// 预览内容
export const preview = (data) => {
  return axios({
    url: '/datavolum/preview',
    method: 'get',
    params: data
  })
};
// 编辑文件内容
export const edit = (data) => {
  return axios({
    url: '/datavolum/edit',
    method: 'put',
    data
  })
};
// 在线解压接口【/datavolum/decompression】【Post】
export const decompression = (data) => {
  return axios({
    url: '/datavolum/decompression',
    method: 'post',
    data
  })
};

// 文件重命名
export const rename = (data) => {
  return axios({
    url: '/datavolum/rename',
    method: 'put',
    data
  })
};

// 目录集合获取
export const getListSonDir = (data) => {
  return axios({
    url: '/datavolum/listSonDir',
    method: 'get',
    params: data
  })
};

// 文件移动
export const move = (data) => {
  return axios({
    url: '/datavolum/move',
    method: 'put',
    data
  })
};
